/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Tela;

import Bean.CadastroAdvogadoBean;
import Bean.CadastroAudienciaBean;
import Bean.CadastroClienteBean;
import Bean.CadastroProcessoBean;
import Dao.CadastroAdvogadoDao;
import Dao.CadastroAudienciaDao;
import Dao.CadastroClienteDao;
import Dao.CadastroProcessoDao;
import Dao.RelatoriosDAO;
import Utils.Relatorio;
import Utils.UtilInterface;
import com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException;
import java.sql.SQLException;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author william
 */
public class CadastroAudiencia extends javax.swing.JFrame {

    private List<CadastroAudienciaBean> listaAudiencia;
    private List<CadastroProcessoBean> listaProcesso;
    private List<CadastroClienteBean> listaCliente;
    private int id = 0;
    private boolean salvar = true;
    private String tipo = "processo";

    /**
     * Creates new form CadastroAudiencia
     */
    public CadastroAudiencia() {
        initComponents();
        atualizarCombo();
        atualizarTabela();
        botoesInical();
        setLocationRelativeTo(null);
    }

    public void botoesInical() {
        btnNovo.setEnabled(true);
        btnSalvar.setEnabled(false);
        btnAlterar.setEnabled(false);
        btnExcluir.setEnabled(false);
        limpaCampos();
        bloqueiaCampos(false);

    }

    public void limpaCampos() {
        txJuiz.setText(null);
        cbprocesso.setSelectedIndex(0);
        cbcliente.setSelectedIndex(0);
        txLocal.setText(null);
        txData.setText(null);
        txHora.setText(null);
    }

    public void bloqueiaCampos(boolean opc) {
        txJuiz.setEnabled(opc);
        txLocal.setEnabled(opc);
        txData.setEnabled(opc);
        txHora.setEnabled(opc);
        cbcliente.setEnabled(opc);
        cbprocesso.setEnabled(opc);
    }

    private void preencheCampos() {
        CadastroAudienciaBean a = listaAudiencia.get(tblAudiencia.getSelectedRow());
        id = a.getIdAudiencia();
        System.out.println(id);
        txJuiz.setText((a.getJuizAudiencia()));
        txLocal.setText(a.getLocalAudiencia());
        txData.setText(a.getDataAudiencia());
        txHora.setText(a.getHoraAudiencia());
        cbcliente.setSelectedItem(a.getControleCliente().getNome());

        bloqueiaCampos(false);
        btnNovo.setEnabled(true);
        btnSalvar.setEnabled(false);
        btnAlterar.setEnabled(true);
        btnExcluir.setEnabled(true);
    }

    private void atualizarCombo() {

        try {
            cbcliente.removeAllItems();
            // cbprocesso.removeAllItems();

            cbcliente.addItem("<Selecione um Cliente>");
            //cbprocesso.addItem("<Selecione o Processo>");

            listaCliente = CadastroClienteDao.getLista();
            //listaProcesso = CadastroProcessoDao.getLista();
            for (CadastroClienteBean c : listaCliente) {
                cbcliente.addItem(c.getNome());

            }

//            for (CadastroProcessoBean p : listaProcesso) {
//                cbprocesso.addItem(p.getIdProcesso());
//
//            }

        } catch (SQLException e) {
            e.printStackTrace();
        }
    }

    public void atualizarTabela() {
        DefaultTableModel modelo = (DefaultTableModel) tblAudiencia.getModel();
        modelo.setNumRows(0);
        try {
            listaAudiencia = CadastroAudienciaDao.getLista();
            for (CadastroAudienciaBean a : listaAudiencia) {
                modelo.addRow(new Object[]{
                            a.getControleProcesso().getNumeroProcesso(),
                            a.getControleCliente().getNome(),
                            a.getDataAudiencia(),});
            }

        } catch (SQLException ex) {
            ex.printStackTrace();
            UtilInterface.msgErro("ERRO AO ATUALIZAR TABELA\n" + ex);
        }
    }

    private void atualizarComboProcessos() {

        try {
            cbprocesso.removeAllItems();
            cbprocesso.addItem("<Selecione o Processo>");
            listaProcesso = CadastroProcessoDao.getLista(listaCliente.get(cbcliente.getSelectedIndex() - 1).getIdcliente());
            for (CadastroProcessoBean c : listaProcesso) {
                cbprocesso.addItem(c.getNumeroProcesso());

            }

        } catch (SQLException e) {
            e.printStackTrace();
        }
    }

    private CadastroAudienciaBean retornaObejeto() {
        CadastroAudienciaBean a = new CadastroAudienciaBean();
        a.setJuizAudiencia(txJuiz.getText().trim());
        a.setLocalAudiencia(txLocal.getText().trim());
        a.setDataAudiencia(txData.getText().trim());
        a.setHoraAudiencia(txHora.getText().trim());
        a.setIdAudiencia(id);
        a.setControleProcesso(listaProcesso.get(cbprocesso.getSelectedIndex() - 1));
        a.setControleCliente(listaCliente.get(cbcliente.getSelectedIndex() - 1));
        return a;
    }

    private boolean verificaCampos() {

        boolean v = true;

     
        if (txJuiz.getText().trim().equals("")) {
            v = false;
            txJuiz.setBackground(UtilInterface.COR_ERRO);
        } else {
            txJuiz.setBackground(UtilInterface.COR_SUCESSO);
        }
        if (txLocal.getText().equals("")) {
            v = false;
            txLocal.setBackground(UtilInterface.COR_ERRO);
        } else {
            txLocal.setBackground(UtilInterface.COR_SUCESSO);
        }

        if (cbcliente.getSelectedIndex() == 0) {
            v = false;
            cbcliente.setBackground(UtilInterface.COR_ERRO);
        } else {
            cbcliente.setBackground(UtilInterface.COR_SUCESSO);
        }
        if (txData.getText().equals("  /  /    ")) {
            v = false;
            txData.setBackground(UtilInterface.COR_ERRO);
        } else {
            txData.setBackground(UtilInterface.COR_SUCESSO);
        }
        if (txHora.getText().equals("  :  ")) {
            v = false;
            txHora.setBackground(UtilInterface.COR_ERRO);
        } else {
            txHora.setBackground(UtilInterface.COR_SUCESSO);
        }
        if (cbcliente.getSelectedIndex() == 0) {
            v = false;
            cbcliente.setBackground(UtilInterface.COR_ERRO);
        } else {
            cbcliente.setBackground(UtilInterface.COR_SUCESSO);
        }
        if (cbprocesso.getSelectedIndex() == 0) {
            v = false;
            cbprocesso.setBackground(UtilInterface.COR_ERRO);
        } else {
            cbprocesso.setBackground(UtilInterface.COR_SUCESSO);
        }

        if (!v) {
            Utils.UtilInterface.msgErro("PREENCHA OS CAMPOS OBRIGATORIOS DE FORMA CORRETA!");

        }
        return v;
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        jPanel1 = new javax.swing.JPanel();
        lbCadastro6 = new javax.swing.JLabel();
        jSeparator6 = new javax.swing.JSeparator();
        jPanel2 = new javax.swing.JPanel();
        cbprocesso = new javax.swing.JComboBox();
        jLabel7 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        lbCliente = new javax.swing.JLabel();
        jTextField1 = new javax.swing.JTextField();
        jButton3 = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        lbCliente1 = new javax.swing.JLabel();
        jPanel3 = new javax.swing.JPanel();
        lbHora = new javax.swing.JLabel();
        lbData = new javax.swing.JLabel();
        lbJuiz = new javax.swing.JLabel();
        txLocal = new javax.swing.JTextField();
        lbLocal = new javax.swing.JLabel();
        txJuiz = new javax.swing.JTextField();
        txData = new javax.swing.JFormattedTextField();
        txHora = new javax.swing.JFormattedTextField();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        lbData1 = new javax.swing.JLabel();
        cbprocesso1 = new javax.swing.JComboBox();
        pBotoes = new javax.swing.JPanel();
        btnNovo = new javax.swing.JButton();
        btnSalvar = new javax.swing.JButton();
        btnAlterar = new javax.swing.JButton();
        btnExcluir = new javax.swing.JButton();
        jScrollPane2 = new javax.swing.JScrollPane();
        tblAudiencia = new javax.swing.JTable();
        lbPesquisar = new javax.swing.JLabel();
        txpesquisa = new javax.swing.JTextField();
        btnPesquisar = new javax.swing.JButton();
        jRadioProcesso = new javax.swing.JRadioButton();
        jRadioCliente = new javax.swing.JRadioButton();
        lbPesquisarPor = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jRadioCliente1 = new javax.swing.JRadioButton();
        jPanel4 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTextArea1 = new javax.swing.JTextArea();
        jRadioCliente2 = new javax.swing.JRadioButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setResizable(false);

        lbCadastro6.setFont(new java.awt.Font("Script MT Bold", 1, 36));
        lbCadastro6.setText("Cadastro de Audiencia");
        lbCadastro6.setToolTipText("");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jSeparator6, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 1026, Short.MAX_VALUE)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(344, 344, 344)
                .addComponent(lbCadastro6)
                .addContainerGap(317, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lbCadastro6)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 18, Short.MAX_VALUE)
                .addComponent(jSeparator6, javax.swing.GroupLayout.PREFERRED_SIZE, 12, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        jPanel2.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        cbprocesso.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "SELECIONAR  PROCESSO" }));

        jLabel7.setBackground(new java.awt.Color(255, 51, 51));
        jLabel7.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel7.setForeground(new java.awt.Color(255, 0, 0));
        jLabel7.setText("*");

        jLabel13.setForeground(new java.awt.Color(255, 0, 0));
        jLabel13.setText("WILLIAM DE MOURA BUENO VIDAL");

        lbCliente.setText("CPF  DO CLIENTE");

        jTextField1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField1ActionPerformed(evt);
            }
        });

        jButton3.setText("BUSCAR");

        jLabel1.setBackground(new java.awt.Color(255, 51, 51));
        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel1.setForeground(new java.awt.Color(255, 0, 0));
        jLabel1.setText("*");

        lbCliente1.setText("NOME:");

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel1)
                        .addGap(3, 3, 3)
                        .addComponent(lbCliente)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jButton3))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(lbCliente1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel13))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(jLabel7)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cbprocesso, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE))))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbCliente)
                    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton3)
                    .addComponent(jLabel1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lbCliente1)
                    .addComponent(jLabel13))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(cbprocesso, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(48, Short.MAX_VALUE))
        );

        jPanel3.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        lbHora.setFont(new java.awt.Font("Tahoma", 0, 14));
        lbHora.setText("Hora");

        lbData.setFont(new java.awt.Font("Tahoma", 0, 14));
        lbData.setText("SITUAÇÃO");

        lbJuiz.setFont(new java.awt.Font("Tahoma", 0, 14));
        lbJuiz.setText("Ex. Sr. Juiz");

        txLocal.setFont(new java.awt.Font("Tahoma", 0, 14));
        txLocal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txLocalActionPerformed(evt);
            }
        });
        txLocal.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                txLocalFocusLost(evt);
            }
        });
        txLocal.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                txLocalKeyTyped(evt);
            }
        });

        lbLocal.setFont(new java.awt.Font("Tahoma", 0, 14));
        lbLocal.setText("Local");

        txJuiz.setFont(new java.awt.Font("Tahoma", 0, 14));
        txJuiz.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txJuizActionPerformed(evt);
            }
        });
        txJuiz.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                txJuizFocusLost(evt);
            }
        });
        txJuiz.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                txJuizKeyTyped(evt);
            }
        });

        txData.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##/##/####")));

        txHora.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##:##")));

        jLabel8.setBackground(new java.awt.Color(255, 51, 51));
        jLabel8.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel8.setForeground(new java.awt.Color(255, 0, 0));
        jLabel8.setText("*");

        jLabel9.setBackground(new java.awt.Color(255, 51, 51));
        jLabel9.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel9.setForeground(new java.awt.Color(255, 0, 0));
        jLabel9.setText("*");

        jLabel10.setBackground(new java.awt.Color(255, 51, 51));
        jLabel10.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel10.setForeground(new java.awt.Color(255, 0, 0));
        jLabel10.setText("*");

        jLabel11.setBackground(new java.awt.Color(255, 51, 51));
        jLabel11.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel11.setForeground(new java.awt.Color(255, 0, 0));
        jLabel11.setText("*");

        jLabel14.setBackground(new java.awt.Color(255, 51, 51));
        jLabel14.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel14.setForeground(new java.awt.Color(255, 0, 0));
        jLabel14.setText("*");

        lbData1.setFont(new java.awt.Font("Tahoma", 0, 14));
        lbData1.setText("Data");

        cbprocesso1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "AGUARDANDO REALIZAÇÃO", "REALIZADA", "CANCELADA" }));
        cbprocesso1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cbprocesso1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel8)
                            .addComponent(jLabel9)
                            .addComponent(jLabel10))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lbJuiz)
                            .addComponent(lbLocal)
                            .addComponent(lbData1))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txJuiz)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                                .addComponent(txData, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel11)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(lbHora)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txHora, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(txLocal))
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addComponent(jLabel14)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lbData)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cbprocesso1, 0, 203, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbJuiz)
                    .addComponent(txJuiz, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel8))
                .addGap(19, 19, 19)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbLocal)
                    .addComponent(txLocal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel9))
                .addGap(18, 18, 18)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lbHora)
                    .addComponent(txData, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txHora, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel10)
                    .addComponent(jLabel11)
                    .addComponent(lbData1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel14)
                    .addComponent(lbData)
                    .addComponent(cbprocesso1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pBotoes.setBackground(new java.awt.Color(204, 204, 204));
        pBotoes.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
        pBotoes.setForeground(new java.awt.Color(51, 51, 255));

        btnNovo.setFont(new java.awt.Font("Tempus Sans ITC", 1, 14));
        btnNovo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/Add.png"))); // NOI18N
        btnNovo.setText("NOVO");
        btnNovo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnNovoActionPerformed(evt);
            }
        });
        pBotoes.add(btnNovo);

        btnSalvar.setFont(new java.awt.Font("Tempus Sans ITC", 1, 14));
        btnSalvar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/Save.png"))); // NOI18N
        btnSalvar.setText("SALVAR");
        btnSalvar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSalvarActionPerformed(evt);
            }
        });
        pBotoes.add(btnSalvar);

        btnAlterar.setFont(new java.awt.Font("Tempus Sans ITC", 1, 14));
        btnAlterar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/Modify.png"))); // NOI18N
        btnAlterar.setText("ALTERAR");
        btnAlterar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAlterarActionPerformed(evt);
            }
        });
        pBotoes.add(btnAlterar);

        btnExcluir.setFont(new java.awt.Font("Tempus Sans ITC", 1, 14));
        btnExcluir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/Delete.png"))); // NOI18N
        btnExcluir.setText("EXCLUIR");
        btnExcluir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnExcluirActionPerformed(evt);
            }
        });
        pBotoes.add(btnExcluir);

        tblAudiencia.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null}
            },
            new String [] {
                "PROCESSO", "CLIENTE", "DATA"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tblAudiencia.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tblAudienciaMouseClicked(evt);
            }
        });
        tblAudiencia.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                tblAudienciaKeyReleased(evt);
            }
        });
        jScrollPane2.setViewportView(tblAudiencia);

        lbPesquisar.setFont(new java.awt.Font("Tahoma", 0, 14));
        lbPesquisar.setText("Pesquisar:");

        txpesquisa.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                txpesquisaKeyReleased(evt);
            }
        });

        btnPesquisar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/View.png"))); // NOI18N
        btnPesquisar.setText("Pesquisar");
        btnPesquisar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnPesquisarActionPerformed(evt);
            }
        });

        buttonGroup1.add(jRadioProcesso);
        jRadioProcesso.setFont(new java.awt.Font("Tahoma", 0, 14));
        jRadioProcesso.setSelected(true);
        jRadioProcesso.setText("Processo");
        jRadioProcesso.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioProcessoActionPerformed(evt);
            }
        });

        buttonGroup1.add(jRadioCliente);
        jRadioCliente.setFont(new java.awt.Font("Tahoma", 0, 14));
        jRadioCliente.setText("Advogado");
        jRadioCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioClienteActionPerformed(evt);
            }
        });

        lbPesquisarPor.setFont(new java.awt.Font("Tahoma", 0, 14));
        lbPesquisarPor.setText("Pesquisar por");

        jLabel17.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel17.setText("Campos Obrigatorios");

        jLabel12.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel12.setForeground(new java.awt.Color(255, 0, 51));
        jLabel12.setText("*");

        buttonGroup1.add(jRadioCliente1);
        jRadioCliente1.setFont(new java.awt.Font("Tahoma", 0, 14));
        jRadioCliente1.setText("Cliente");
        jRadioCliente1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioCliente1ActionPerformed(evt);
            }
        });

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder("Descrição da audiencia"));

        jTextArea1.setColumns(20);
        jTextArea1.setRows(5);
        jScrollPane1.setViewportView(jTextArea1);

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 381, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 431, Short.MAX_VALUE)
        );

        buttonGroup1.add(jRadioCliente2);
        jRadioCliente2.setFont(new java.awt.Font("Tahoma", 0, 14));
        jRadioCliente2.setText("Data");
        jRadioCliente2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioCliente2ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                .addComponent(jLabel12)
                                .addGap(13, 13, 13)
                                .addComponent(jLabel17)
                                .addGap(0, 455, Short.MAX_VALUE))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(pBotoes, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18)
                                    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addComponent(btnPesquisar))))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(24, 24, 24)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lbPesquisar)
                            .addComponent(lbPesquisarPor))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jRadioProcesso)
                                .addGap(12, 12, 12)
                                .addComponent(jRadioCliente1)
                                .addGap(18, 18, 18)
                                .addComponent(jRadioCliente2)
                                .addGap(18, 18, 18)
                                .addComponent(jRadioCliente))
                            .addComponent(txpesquisa, javax.swing.GroupLayout.PREFERRED_SIZE, 405, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 118, Short.MAX_VALUE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(12, 12, 12)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGap(18, 18, 18)
                        .addComponent(pBotoes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(30, 30, 30)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jRadioProcesso)
                            .addComponent(lbPesquisarPor)
                            .addComponent(jRadioCliente1)
                            .addComponent(jRadioCliente2)
                            .addComponent(jRadioCliente))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(txpesquisa, javax.swing.GroupLayout.DEFAULT_SIZE, 33, Short.MAX_VALUE)
                                .addComponent(btnPesquisar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addComponent(lbPesquisar))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel17)
                    .addComponent(jLabel12))
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void txJuizActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txJuizActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txJuizActionPerformed

    private void txLocalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txLocalActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txLocalActionPerformed

    private void btnNovoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNovoActionPerformed
        btnNovo.setEnabled(false);
        btnExcluir.setEnabled(false);
        btnSalvar.setEnabled(true);
        btnAlterar.setEnabled(false);
        limpaCampos();
        bloqueiaCampos(true);
        salvar = true;
    }//GEN-LAST:event_btnNovoActionPerformed

    private void btnSalvarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSalvarActionPerformed
        if (verificaCampos()) {
            if (salvar) {
                try {
                    CadastroAudienciaDao.salvar(retornaObejeto());
                    atualizarTabela();
                    UtilInterface.msqSucesso(UtilInterface.MSG_SUC_SALVAR);
                    botoesInical();
                } catch (MySQLIntegrityConstraintViolationException e) {
                    UtilInterface.msgErro("Ja existe cadastro dessa audiência");
                } catch (SQLException ex) {
                    Logger.getLogger(CadastroProcesso.class.getName()).log(Level.SEVERE, null, ex);
                }

            } else {
                try {
                    CadastroAudienciaDao.alterar(retornaObejeto());
                    atualizarTabela();
                    UtilInterface.msqSucesso(UtilInterface.MSG_SUC_ALTERAR);
                    botoesInical();
                }catch (MySQLIntegrityConstraintViolationException e) {
                    UtilInterface.msgErro("Ja existe cadastro dessa audiência");
                }catch (SQLException e) {
                    UtilInterface.msgErro("Erro ao Alterar\n" + e);
                }
            }
        }

    }//GEN-LAST:event_btnSalvarActionPerformed

    private void btnAlterarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAlterarActionPerformed
        salvar = false;
        bloqueiaCampos(true);
        btnNovo.setEnabled(false);
        btnSalvar.setEnabled(true);
        btnAlterar.setEnabled(false);
        btnExcluir.setEnabled(false);
    }//GEN-LAST:event_btnAlterarActionPerformed

    private void btnExcluirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnExcluirActionPerformed
        if (UtilInterface.msgConfirmacao("Deseja excluir o registro?") == JOptionPane.YES_OPTION) {
            try {
                CadastroAudienciaDao.excluir(id);
                UtilInterface.msqSucesso("Excluido com sucesso");
                atualizarTabela();
                botoesInical();
            } catch (Exception e) {
                UtilInterface.msgErro("Erro ao Excluir Registro!\n" + e);
            }
        }
    }//GEN-LAST:event_btnExcluirActionPerformed

    private void tblAudienciaMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tblAudienciaMouseClicked
        preencheCampos();
    }//GEN-LAST:event_tblAudienciaMouseClicked

    private void tblAudienciaKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tblAudienciaKeyReleased
        preencheCampos();
    }//GEN-LAST:event_tblAudienciaKeyReleased

    private void txJuizKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txJuizKeyTyped
        if (txJuiz.getText().length() > 50) {
            UtilInterface.msgErro("Voce atingiu o limite de caracteres!\n Por favor abrevie");
        }
    }//GEN-LAST:event_txJuizKeyTyped

    private void txLocalKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txLocalKeyTyped
        if (txLocal.getText().length() > 50) {
            UtilInterface.msgErro("Voce atingiu o limite de caracteres!\n Por favor abrevie");
        }
    }//GEN-LAST:event_txLocalKeyTyped

    private void txJuizFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txJuizFocusLost
        txJuiz.setText(txJuiz.getText().toUpperCase());
    }//GEN-LAST:event_txJuizFocusLost

    private void txLocalFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txLocalFocusLost
        txLocal.setText(txLocal.getText().toUpperCase());
    }//GEN-LAST:event_txLocalFocusLost

    private void atualizarTabelapesquisa() {
        try {
            DefaultTableModel modelo = (DefaultTableModel) tblAudiencia.getModel();
            modelo.setNumRows(0);
            listaAudiencia = CadastroAudienciaDao.pesquisa(tipo, txpesquisa.getText());
            for (CadastroAudienciaBean a : listaAudiencia) {
                modelo.addRow(new Object[]{
                            a.getControleProcesso().getNumeroProcesso(),
                            a.getControleCliente().getNome(),
                            a.getDataAudiencia(),});
            }
        } catch (SQLException e) {
            e.printStackTrace();
        }

    }

    private void btnPesquisarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPesquisarActionPerformed
        if (!txpesquisa.getText().trim().isEmpty()) {
            if (tipo.equalsIgnoreCase("processo")) {
                try {
                    int a = Integer.parseInt(txpesquisa.getText());
                    atualizarTabelapesquisa();
                } catch (NumberFormatException e) {
                    UtilInterface.msgErro("Formato invalido do processo");
                }
            } else {
                atualizarTabelapesquisa();
            }
        }
    }//GEN-LAST:event_btnPesquisarActionPerformed

    private void jRadioProcessoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioProcessoActionPerformed
        tipo = "processo";
    }//GEN-LAST:event_jRadioProcessoActionPerformed

    private void jRadioClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioClienteActionPerformed
        tipo = "cliente";
    }//GEN-LAST:event_jRadioClienteActionPerformed

    private void txpesquisaKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txpesquisaKeyReleased
        if(txpesquisa.getText().trim().isEmpty()){
            atualizarTabela();
        }
    }//GEN-LAST:event_txpesquisaKeyReleased

    private void jRadioCliente1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioCliente1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jRadioCliente1ActionPerformed

    private void cbprocesso1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbprocesso1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_cbprocesso1ActionPerformed

private void jRadioCliente2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioCliente2ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jRadioCliente2ActionPerformed

private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField1ActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_jTextField1ActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(CadastroAudiencia.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(CadastroAudiencia.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(CadastroAudiencia.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(CadastroAudiencia.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new CadastroAudiencia().setVisible(true);
            }
        });
    }

    protected void preencheComboProcesso() {
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAlterar;
    private javax.swing.JButton btnExcluir;
    private javax.swing.JButton btnNovo;
    private javax.swing.JButton btnPesquisar;
    private javax.swing.JButton btnSalvar;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JComboBox cbprocesso;
    private javax.swing.JComboBox cbprocesso1;
    private javax.swing.JButton jButton3;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JRadioButton jRadioCliente;
    private javax.swing.JRadioButton jRadioCliente1;
    private javax.swing.JRadioButton jRadioCliente2;
    private javax.swing.JRadioButton jRadioProcesso;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JSeparator jSeparator6;
    private javax.swing.JTextArea jTextArea1;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JLabel lbCadastro6;
    private javax.swing.JLabel lbCliente;
    private javax.swing.JLabel lbCliente1;
    private javax.swing.JLabel lbData;
    private javax.swing.JLabel lbData1;
    private javax.swing.JLabel lbHora;
    private javax.swing.JLabel lbJuiz;
    private javax.swing.JLabel lbLocal;
    private javax.swing.JLabel lbPesquisar;
    private javax.swing.JLabel lbPesquisarPor;
    private javax.swing.JPanel pBotoes;
    private javax.swing.JTable tblAudiencia;
    private javax.swing.JFormattedTextField txData;
    private javax.swing.JFormattedTextField txHora;
    private javax.swing.JTextField txJuiz;
    private javax.swing.JTextField txLocal;
    private javax.swing.JTextField txpesquisa;
    // End of variables declaration//GEN-END:variables
}
